home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Die Speccy' 97
/
Die Speccy' 97.iso
/
amiga_system
/
the_aminet
/
comm
/
mail
/
netmail_13.lha
/
NetMail
/
Drivers
/
GoldED.reader
< prev
next >
Wrap
Text File
|
1995-10-10
|
3KB
|
107 lines
/*
** $VER: GoldED.reader 1.0 (10.10.95)
** Copyright (c) 1995 Riccardo Solmi
**
*/
OPTIONS RESULTS
OPTIONS FAILAT 21
cmd = 'GoldED:ED'
IF ~EXISTS(cmd) THEN DO
cmd = GetVar('NetMail/GoldEDCmd')
IF cmd = 0 | ~EXISTS(cmd) THEN DO
ADDRESS COMMAND 'SetEnv NetMail/GoldEDCmd `Which "GED"`'
cmd = GetVar('NetMail/GoldEDCmd')
IF cmd = 0 THEN DO
ADDRESS COMMAND 'SetEnv NetMail/GoldEDCmd `RequestFile Title "Select GED command" Noicons`'
cmd = GetVar('NetMail/GoldEDCmd')
IF cmd = 0 | ~EXISTS(cmd) THEN RETURN 2
ADDRESS COMMAND 'Copy QUIET ENV:NetMail/GoldEDCmd ENVARC:NetMail/GoldEDCmd'
END
END
END
SELECT
WHEN UPPER(ARG(1)) = 'READ' THEN DO
PARSE ARG , file, whandle
winpar = ''
wininfo = GetVar('NetMail/ReaderWin')
IF wininfo ~= 0 THEN DO
PARSE VAR wininfo pL pT pW pH .
winpar = 'X' pL 'Y' pT 'WIDTH' pW 'HEIGHT' pH
END
port = 'GOLDED.1'
IF SHOW('P', port) THEN DO
ADDRESS VALUE port
'Query WINDOWS VAR MAXWIN'
DO win = 0 TO MAXWIN-1
'Window QUIET ORDINAL' win
'Query HANDLE VAR WINHANDLE'
IF winhandle = whandle THEN LEAVE
END
IF winhandle = whandle THEN
'Open QUIET FAST NAME "'file'"'
ELSE DO
'Open NEW QUIET FAST NAME "'file'"'
whandle = RESULT
END
END
ELSE DO
ADDRESS COMMAND
'"'cmd'" "'file'"'
'WaitForPort' port
IF RC ~= 0 THEN RETURN 5
ADDRESS VALUE port
'Query HANDLE VAR WHANDLE'
END
IF winpar ~='' THEN 'Window' winpar
END
WHEN UPPER(ARG(1)) = 'CLEAR' THEN DO
PARSE ARG , whandle
port = 'GOLDED.1'
IF SHOW('P', port) THEN DO
ADDRESS VALUE port
'Query WINDOWS VAR MAXWIN'
DO win = 0 TO MAXWIN-1
'Window QUIET ORDINAL' win
'Query HANDLE VAR WINHANDLE'
IF winhandle = whandle THEN LEAVE
END
IF winhandle = whandle THEN DO
'Window HANDLE' whandle
'New FORCE NONAME'
END
END
END
WHEN UPPER(ARG(1)) = 'CLOSE' THEN DO
PARSE ARG , whandle
port = 'GOLDED.1'
IF SHOW('P', port) THEN DO
ADDRESS VALUE port
'Query WINDOWS VAR MAXWIN'
DO win = 0 TO MAXWIN-1
'Window QUIET ORDINAL' win
'Query HANDLE VAR WINHANDLE'
IF winhandle = whandle THEN LEAVE
END
IF winhandle = whandle THEN DO
'Window HANDLE' whandle
wininfo = GetVar('NetMail/ReaderWin')
PARSE VAR wininfo pL pT pW pH cLTWH
'Query X VAR PL'
'Query Y VAR PT'
'Query WINW VAR PW'
'Query WINH VAR PH'
CALL SetVar('NetMail/ReaderWin', pL pT pW pH cLTWH)
'Quit FORCE NOSAVE'
END
END
END
END
RETURN whandle